package nl.hanze.designpatterns.gui;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.border.TitledBorder;

import java.awt.*;

public class Mainscreen extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8726602089565111504L;
	
	public Mainscreen(String username){
		
		JTabbedPane tabbedpanel = new JTabbedPane();
		getContentPane().add(tabbedpanel);
		
		JPanel tab1 = new JPanel(new GridLayout());
		tab1.add(new TroubleTicketPanel(username));
	
		JPanel tab2 = new JPanel(new GridLayout());
		tab2.add(new FaqPanel());
		
		JPanel tab3 = new JPanel(new GridLayout());
		tab3.add(new SearchTroubleTicketsPanel());
		
		tabbedpanel.addTab("New Troubleticket", tab1);
		tabbedpanel.addTab("FAQ", tab2);
		tabbedpanel.addTab("Search tickets from caller", tab3);
		
		setTitle("mainscreen");
		setSize(800, 600);
		setLocationRelativeTo(null);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		
	}

		/**public static void main(String[] args){
			Mainscreen mainscreen = new Mainscreen();
			mainscreen.setVisible(true);
			
		}*/
}
